package com.sgb.kjwl.di.vehicleManagement;

import com.sgb.kjwl.repository.HomeRepertory;
import com.sgb.kjwl.repository.impl.HomeRepertoryImpl;
import com.sgb.kjwl.view.ui.activity.vehicleManagement.DriverCertificationActivity;
import com.sgb.kjwl.viewmodel.vehicleManagement.DriverCertificationAtvModel;
import com.swgk.core.base.di.Activity;
import com.swgk.core.base.api.BaseApiSource;
import com.swgk.core.base.model.preference.BasePreferenceSource;

import dagger.Module;
import dagger.Provides;

@Module
public class DriverCertificationModule{

    private DriverCertificationActivity driverCertificationActivity;

    public DriverCertificationModule(DriverCertificationActivity driverCertificationActivity) {
        this.driverCertificationActivity = driverCertificationActivity;
    }


    @Provides
    @Activity
    HomeRepertory provideHomeRepertory(BaseApiSource apiSource, BasePreferenceSource preferenceSource) {
        return new HomeRepertoryImpl(apiSource, preferenceSource);
    }


    @Provides
    @Activity
    DriverCertificationAtvModel provideDriverCertificationAtvModel(HomeRepertory repertory) {
        return new DriverCertificationAtvModel(driverCertificationActivity, repertory);
    }

}
